*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
************************ DRÄGER AND NGHIEM (2025) ***********************
*INFLATION LITERACY, INFLAION EXPECTATIONS, AND TRUST IN THE CENTRAL BANK: 
*                           A SURVEY EXPERIMENT 
****************** THE REVIEW OF ECONOMICS AND STATISTICS ***************
*********************** (REPLICATION FILES) *****************************
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

***********************   JANUARY 2025  *******************************

***** Note: Read "README.txt for details about the code and data ********

*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*** Set STATA
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

*** Clear all ***
clear all
version 18

******************

*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*** Generate tables and figures in the Online Appendix

*A.5 Robustness Checks
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

	use "Inflation_literacy_Jan2025_final.dta" , clear

*A.5 Robustness Checks

*A.5.1 Without Demographic Controls

*Table A26: Effect of the Literacy Treatment on Literacy Test Results: Without Demographic Controls

	estimate clear
	local target "literacy_grade_inf literacy_fin2"

	foreach y of local target {
	qui: reg `y' basic_treatment if wave ==1, robust
	qui: estpost margins , dydx(basic_treatment)
	eststo
	}
	
	qui: reg literacy_grade_inf basic_treatment `controls' if wave ==2, robust
	qui: estpost margins , dydx(basic_treatment)
	eststo
		
	esttab using "TableA26.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	title(Effect of Economic Literacy on Economic Literacy Test Results) ///
	stats(r2 N, labels("\text{ R$^2$}" "\text{N observations}") fmt(3 0 0))	
	
*Table A27: Effect of the Literacy Treatment on Inflation Expectations and Trust in the Central Bank: Without Demographic Controls

	estimate clear
	local target "inf_perc_point_ans inf_exp1y_point_ans inf_exp3y_point_ans ECB_target_ans"
	
	foreach y of local target {
	qui: probit `y' basic_treatment  if wave == 1
	qui: estpost margins , dydx(basic_treatment)
	qui: estadd scalar r2_p = e(r2_p), replace  // Save Pseudo R^2
	eststo
	}

	local target "inf_perc_point inf_exp1y_point inf_exp3y_point ECB_target"
	
	foreach y of local target {

	qui: rreg `y' basic_treatment if wave ==1 & sample_robust_w1_298 == 1
	qui: estpost 
	qui: estpost margins, dydx(basic_treatment)
	qui: estadd scalar r2 = e(r2), replace   // Save R^2
	eststo
	}
	
	local target "trust_ecb trust_bundesbank"
	
	foreach y of local target {
	qui: reg `y' basic_treatment if wave == 1 & further_treatment == 0, robust
	qui: estpost margins, dydx( basic_treatment)
	qui: estadd scalar r2 = e(r2), replace   // Save R^2
	eststo
	}

	esttab using "TableA27.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	title(Effect of the Literacy Treatment on Inflation Expectations and Trust in the Central Bank) ///
	stats(r2_p r2 N, labels("\text{Pseudo R$^2$}" "\text{R$^2$}" "\text{N observations}") fmt(3 3 0))	
	

*Table A28: Interaction Effects of the Literacy Treatment and Quantitative Information Treatments: Without Demographic Controls

	estimate clear
	
	local target "inf_exp1y inf_exp3y"
	
	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: rreg `y'_prob inf_prior i.further_treatment##i.basic_treatment  if wave== 1 & sample_robust_w1_298 == 1
	qui: estpost  
	eststo
	drop inf_prior
	}
	

	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: rreg `y'_var inf_prior i.further_treatment##i.basic_treatment  if wave== 1 & sample_robust_w1_298 == 1
	qui: estpost  
	eststo
	drop inf_prior
	}
	
	local target "trust_ecb trust_bundesbank"
	
	foreach y of local target {
	gen inf_prior = inf_exp3y_point	
		
	qui: reg `y' inf_prior i.further_treatment##i.basic_treatment if wave == 1 & sample_robust_w1_298 == 1, robust
	qui: estpost  
	eststo
	drop inf_prior
	}

	
	esttab using "TableA28.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	 star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	 title(Interaction Effects of the Literacy Treatment and Quantitative Information Treatments) ///
	stats(r2 N, labels("\text{R$^2$}" "\text{N observations}") fmt(3 0 0))
	
********************************************************************************
********************************************************************************
*A.5.2 Without Prior Inflation Expectations Truncation

*Table A29: Effect of the Literacy Treatment on Inflation Expectations (Intensive margin of Step 1): No Truncation of Prior Predictions

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	
	local target "inf_perc_point inf_exp1y_point inf_exp3y_point ECB_target"
	
	foreach y of local target {

	qui: rreg `y' basic_treatment `controls' if wave ==1 & sample_robust_w1 == 1
	qui: estpost margins, dydx(basic_treatment)
	eststo
	}
		
	
	esttab using "TableA29.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	title(Effect of the Literacy Treatment on Inflation Expectations (Intensive margin of Step 1)) ///
	stats(r2 N, labels("\text{R$^2$}" "\text{N observations}") fmt(3 0 0))
	
*Table A30: Interaction Effects of the Literacy Treatment and Quantitative Information Treatments: No Truncation of Prior Predictions

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y inf_exp3y"
	
	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: rreg `y'_prob inf_prior i.further_treatment##i.basic_treatment  `controls' if wave== 1 & sample_robust_w1 == 1
	qui: estpost  
	eststo
	drop inf_prior
	}
	

	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: rreg `y'_var inf_prior i.further_treatment##i.basic_treatment  `controls' if wave== 1 & sample_robust_w1 == 1
	qui: estpost  
	eststo
	drop inf_prior
	}
	
	local target1 "trust_ecb trust_bundesbank"
	
	foreach y of local target1 {
	gen inf_prior = inf_exp3y_point	
		
	qui: reg `y' inf_prior i.further_treatment##i.basic_treatment `controls' if wave == 1 & sample_robust_w1 == 1, robust
	qui: estpost  
	eststo
	drop inf_prior
	}

	
	esttab using "TableA30.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	 star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	 title(Interaction Effects of the Literacy Treatment and Quantitative Information Treatments: No Truncation of Prior Predictions) ///
	stats(r2 N, labels("\text{R$^2$}" "\text{N observations}") fmt(3 0 0))
	
*A.5.3 Median Regressions

*Table A31: Effect of the Literacy Treatment on Inflation Expectations (Intensive margin of Step 1): Median Regressions

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_perc_point inf_exp1y_point inf_exp3y_point ECB_target"
	
	foreach y of local target {

	qui: qreg `y' basic_treatment `controls' if wave ==1 & sample_robust_w1_298 == 1
	qui: estpost 
	qui: estpost margins, dydx(basic_treatment)
	eststo
	}
	
	esttab using "TableA31.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	title(Effect of Economic Literacy on Inflation Expectations: Quantile Regression) ///
	stats(r2_p N, labels("\text{Pseudo R$^2$}" "\text{N observations}") fmt(3 0 0))
	
*Table A32: Interaction Effects of the Literacy Treatment and Quantitative Information Treatments: Median Regressions

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y inf_exp3y"
	
	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: qreg `y'_prob inf_prior i.further_treatment##i.basic_treatment  `controls' if wave== 1 & sample_robust_w1_298 == 1
	qui: estpost  
	eststo
	drop inf_prior
	}
	

	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: qreg `y'_var inf_prior i.further_treatment##i.basic_treatment  `controls' if wave== 1 & sample_robust_w1_298 == 1
	qui: estpost  
	eststo
	drop inf_prior
	}
	
	esttab using "TableA32.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	 star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	 title(Interaction Effects of the Literacy Treatment and Quantitative Information Treatments: Median Regressions) ///
	stats(r2_p N, labels("\text{R$^2$}" "\text{N observations}") fmt(3 0 0))
	
********************************************************************************
********************************************************************************
*A.5.4 Time Spent Reading the Treatments

*Table A33: Effect of the Literacy Treatment on Literacy Test Results: Time Spent Reading the Treatments

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "literacy_grade_inf literacy_fin2"

	foreach y of local target {
	qui: reg `y' i.basic_time `controls' if wave ==1, robust
	qui: estpost margins , dydx(i.basic_time)
	eststo
	}
	
	qui: reg literacy_grade_inf i.basic_time `controls' if wave ==2, robust
	qui: estpost margins , dydx(i.basic_time)
	eststo
	
		
	esttab using "TableA33.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	title(Effect of Economic Literacy on Economic Literacy Test Results: Time Spent Reading the Treatments) ///
	stats(r2 N, labels("\text{ R$^2$}" "\text{N observations}") fmt(3 0 0))	


*Table A34: Effect of the Literacy Treatment on Inflation Expectations and Trust in the Central Bank: Time Spent Reading the Treatments

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_perc_point_ans inf_exp1y_point_ans inf_exp3y_point_ans ECB_target_ans"
	
	foreach y of local target {
	qui: probit `y' i.basic_time  `controls' if wave == 1
	qui: estpost margins , dydx(basic_time)
	qui: estadd scalar r2_p = e(r2_p), replace  // Save Pseudo R^2
	eststo
	}

	local target "inf_perc_point inf_exp1y_point inf_exp3y_point ECB_target"
	
	foreach y of local target {

	qui: rreg `y' i.basic_time `controls' if wave ==1 & sample_robust_w1_298 == 1
	qui: estpost 
	qui: estpost margins, dydx(basic_time)
	qui: estadd scalar r2 = e(r2), replace   // Save R^2
	eststo
	}
	
	local target "trust_ecb trust_bundesbank"
	
	foreach y of local target {
	qui: reg `y' i.basic_time `controls' if   wave == 1 & further_treatment == 0, robust
	qui: estpost margins, dydx(basic_time)
	qui: estadd scalar r2 = e(r2), replace   // Save R^2
	eststo
	}

	esttab using "TableA34.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	title(Effect of the Literacy Treatment on Inflation Expectations and Trust in the Central Bank: Time Spent Reading the Treatments) ///
	stats(r2_p r2 N, labels("\text{Pseudo R$^2$}" "\text{R$^2$}" "\text{N observations}") fmt(3 3 0))	


*Table A35: Interaction Effects of the Literacy Treatment and Quantitative Information Treatments: Excluding Non-compliant Respondents

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y inf_exp3y"
	
	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: rreg `y'_prob inf_prior i.further_treatment##i.basic_treatment  `controls' if duration_tA >= 15 & t_spent >= 10 & wave== 1 & sample_robust_w1_298 == 1
	qui: estpost  
	eststo
	drop inf_prior
	}
	

	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: rreg `y'_var inf_prior i.further_treatment##i.basic_treatment  `controls' if duration_tA >= 15 & t_spent >= 10 & wave== 1 & sample_robust_w1_298 == 1
	qui: estpost  
	eststo
	drop inf_prior
	}
	
	local target1 "trust_ecb trust_bundesbank"
	
	foreach y of local target1 {
	gen inf_prior = inf_exp3y_point	
		
	qui: reg `y' inf_prior i.further_treatment##i.basic_treatment `controls' if duration_tA >= 15 & t_spent >= 10 & wave == 1 & sample_robust_w1_298 == 1, robust
	qui: estpost  
	eststo
	drop inf_prior
	}

	esttab using "TableA35.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	 star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	 title(Interaction Effects of the Literacy Treatment and Quantitative Information Treatments: Excluding Non-compliant Respondents) ///
	stats(r2 N, labels("\text{R$^2$}" "\text{N observations}") fmt(3 0 0))

*Table A36: Effect of the Literacy Treatment on Time Spent Reading the Quantitative Information Treatments
	
	estimate clear
	local controls "i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"

* Loop through further_treatment groups
forval ft = 1/4 {
    qui: rreg t_spent basic_treatment `controls' if further_treatment == `ft' & sample_robust_w1_298 == 1
	qui: estpost margins, dydx(basic_treatment)
    * Calculate the median value of t_spent for the same subset of the data
    qui: summarize t_spent if further_treatment == `ft' & sample_robust_w1_298 == 1, detail
    local median_t_spent = r(p50)
    * Add the median as a custom statistic
    qui: estadd scalar median = `median_t_spent'
    eststo
}

* Generate the table
	esttab using "TableA36.tex", replace style(tex) b(a2) numbers nodepvars ///
    star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2) label ///
    title(Effect of the Literacy Treatment on Time Spent Reading the Quantitative Information Treatments) ///
    stats(median r2 N, labels("\text{Median $t_{spent}$}" "\text{R$^2$}" "\text{N observations}") fmt(2 3 0))
	
	
*Table A37: Effect of the Literacy Treatment on Inflation Literacy: Individual Test Questions
	
	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "literacy1_true literacy7_true literacy2_true literacy3_true literacy4_true f.literacy1_true f.literacy7_true f.literacy2_true f.literacy3_true f.literacy4_true"

	foreach y of local target {
	qui: probit `y' basic_treatment `controls' if wave ==1
	qui: estpost margins , dydx(basic_treatment)
	eststo
	}
		
	esttab using "TableA37.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	title(Effect of the Literacy Treatment on Inflation Literacy: Individual Test Questions) ///
	stats(r2_p N, labels("\text{Pseudo R$^2$}" "\text{N observations}") fmt(3 0 0))		
	
********************************************************************************
********************************************************************************